<script setup lang='ts'>
import headerVue from "../components/header.vue";
import tabBar from "../components/tabBar.vue";
import { RouterView,useRouter,useRoute } from "vue-router";
import { page } from "../utils/reload";
import { onMounted } from "vue";
const { loading, onRefresh } = page()
const router = useRouter()
const route = useRoute()
onMounted(()=>{
  if(route.query.isrouter !== undefined) return
  router.push({name:'home',query:{isrouter:'0'}})
})
</script>

<template>
  <div class="m">
    <headerVue></headerVue>
    <van-pull-refresh v-model="loading" @refresh="onRefresh">
      <div class="content">
        <RouterView></RouterView>
      </div>
    </van-pull-refresh>
    <tabBar></tabBar>
  </div>
</template>

<style scoped>
.content {
  min-height: calc(100vh - 100px);
}
.h{
  height: 20px;
}
ul{
  padding: 0;
  margin: 0;
}
li{
  list-style: none;
}
@media screen and (min-width:1025px) {
  .content{
    display: block;
    background-color: #f5f2f0;
    min-height:100vh !important;
  }
}
</style>